<!DOCTYPE html>
<html>
	<head>
	<title>产品购买</title>
		<meta http-equiv="Pragma" CONTENT="no-cache">
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="renderer" content="webkit">

		<%include("/common/include.html"){}%>
		
	</head>
	<body>	
		<div id="cpgm"   class="easyui-layout" style="width:100%;height:100%;">
		<input id="ymtype" type="hidden" value="${ymtype!}">
			<div data-options="region:'north'" style="height:110px;">
					<%include("/customer/searchCustomer3.html"){}%>
				<br>
				<div  class="charge" style="">
					<ul class="headContent">
						<li style="margin-left:0px;">
							<div>
								<span>选择类别</span>
								<input  id="selType_combobox" class=" easyui-combobox  theme-textbox-radius" style="height:32px;width:120px;text-align:center"/>
							</div>
						</li>
						<li style="margin-left:20px;">
							<div>
								<span>选择产品</span>
									<input  id="addPro_combobox" class=" easyui-combobox theme-textbox-radius" style="width:120px;height:32px;text-align:center"/>
							</div>
						</li>
						<li style="margin-left:20px;">
							<div>
								<span>选择日期</span>
									<input id="date" class="easyui-datebox theme-textbox-radius"  value = ${date!}  data-options="sharedCalendar:'#cc'" style="height: 32px;">
							</div>
						</li>
						<div id="cc" class="easyui-calendar "></div>	
						<li  style="float:right;margin-top:20px;margin-right: 20px;">
							<div >
									<span style="font-weight: bold;">订单编号：</span>
									<input id="orderNumber" type="text" name="orderNumber" style="width: 120px;" value="${orderNumber !}" readonly="true" /> 
							</div>
						</li>
					</ul>
				</div>
			</div>
			
			<div data-options="region:'center'" style="OVERFLOW-X:hidden;">
					<table id="buyProduct" class="easyui-datagrid" style="width: 100%;height:216px"
							data-options="
								singleSelect: true,
								fitColumns:true,
								method: 'get',
								onClickRow: onClickRow
							">
						<thead>
							<tr>
								<th   data-options="field:'probh',width:100,align:'center'">编号</th>
								<th data-options="field:'name',width:100,align:'center'">名称</th>
								<th data-options="field:'typename',width:100,align:'center'">类别</th>
								<th data-options="field:'number',width:100,align:'center'">数量</th>
								<th data-options="field:'outprice',width:100,align:'center'">单价（元）</th>
								<th data-options="field:'total',width:100,align:'center'">总价（元）</th>
								
								<th data-options="field:'totalExperience',width:100,align:'center',	
								  editor:{type:'numberspinner',
								    options:{
											min:0,
											precision:1,
											increment:0.1,
											 onChange : function(n){
													 sum3(n);
												}
											}}">剩余次数</th>
								<!-- <th data-options="field:'yxDate',width:100,align:'center',	
								  editor:{type:'datebox',
								    options:{
											 onChange : function(n){
													 sum2(n);
												}
											}}">过期</th> -->
								<th data-options="field:'Operate',width:100,align:'center',formatter:go">操作</th>
							
							</tr>
						</thead>
						<tbody>
						</tbody>
					</table>	
					<div style="margin-left: 15px;margin-top: 15px;width:98%;">
						<span style="font-weight: bold;">应收款：</span>
						<input id="receivable" type="text"  readonly="readonly" class="easyui-numberbox theme-textbox-radius" style="text-align:center;border-bottom:1px solid black;width: 80px;"/>
						<span style="font-weight: bold;margin-left: 15px;">实收款：</span>
						<input  id="proceeds" type="text" class="easyui-numberbox theme-textbox-radius"  style="text-align:center;border-bottom:1px solid black;width: 80px;"/>
						<span style="font-weight: bold;margin-left: 15px;">欠款：</span>
						<input  id="arrears" type="text" class="easyui-numberbox theme-textbox-radius" style="text-align:center;border-bottom:1px solid black;width: 80px;" readonly="readonly" value="0"/>
						<span style="font-weight: bold;margin-left: 15px;">收款方式：</span>
						<#code type="select" id="skfs_select"   code="code_skfs"  class="easyui-combobox inputBox theme-textbox-radius" />

						<span style="font-weight: bold;margin-left: 15px;">销售人：</span>
						<#organization type="select" id="xsr_select"  organization="${organids! }" defaultCode="${userids !}"   class="easyui-combobox inputBox theme-textbox-radius" />
						<span style="font-weight: bold;margin-left: 15px;">产品编号：</span>
						<input id="cpbh"  class="easyui-textbox theme-textbox-radius"  style="text-align:center;border-bottom:1px solid black;width: 80px;"  />
						<a href="javascript:void(0);" class="easyui-linkbutton" style="float:right;background: #00A65A;color: white;margin-right: 20px;" onclick="settlement()">结算</a>	
					</div>
			</div>
		</div>
		<script src="sb/js/collectionBuyProduct/collectionBuyProduct.js" type="text/javascript" charset="utf-8"></script>
	</body>
</html>
